// 1、
const express = require('express');

// 拿到路由实例
const router = express.Router();
// 1、引入中间件
const expressJoi = require('@escook/express-joi');

const { login, regUser } = require('../router_handler/user');

// 2、引入校验规则
const { reg_login_schema } = require('../schema/user');

// 挂载路由
// 注册接口
router.post('/reguser', expressJoi(reg_login_schema), regUser);

// 登录接口
router.post('/login', expressJoi(reg_login_schema), login);

// 导出路由
module.exports = router;
